'use strict';

/**
 * @ngdoc function
 * @name webApp.controller:PopimgCtrl
 * @description
 * # PopimgCtrl
 * Controller of the webApp
 */

angular.module('webApp')
  .controller('popImg', function ($scope,promisePopImg) {
  //验证码
  var change = function(){
    promisePopImg.captcha().then(function(data){
      $scope.token = data;
      $scope.imagesGet = '/v2/generate_captcha?token=' + data;
    });
  };
  change();
  $scope.changeImg = function(){
    change();
  };
});
